package com.example.educationalsystem.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author zpc
 * @since 2022-12-02
 */
@ColumnWidth(30)//注释在具体属性上,设置单独列。注释在类上,统一设置列宽
@HeadRowHeight(30)//设置表头行高
@ContentRowHeight(20)//统一设置数据行行高
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("vote")
@ApiModel(value="Vote对象", description="")
public class Vote extends Model<Vote> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "教师编号")
    @ExcelProperty(value = "教师编号" )
    @TableField("teacher_id")
    private String teacherId;

    @ApiModelProperty(value = "教师得票数")
    @ExcelProperty(value = "得票数" )
    @TableField("vote_count")
    private Integer voteCount;

    @ApiModelProperty(value = "自增")
    @TableId("vote_id")
    @ExcelProperty(value = "编号")
    private Integer voteId;


    @Override
    protected Serializable pkVal() {
        return this.voteId;
    }

}
